import { importFile, postRequestJson, postRequestList } from '../utils/request'
export const getSupplierGreyFabricList = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/supplierGreyFabric/pageList`, data)
export const getFabricOrderPage = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/purchaseFabricOrder/getFabricOrderPage`, data)
export const importExcelForCreate = <T>(data?: any): Promise<IResponsePost<T>> =>
  importFile(`/api/sop/sop/supplierGreyFabric/importExcelForCreate`, data)
export const importEditFabricColor = <T>(data?: any, extraParams?: any): Promise<IResponsePost<T>> =>
  importFile(`/api/sop/sop/productSpuFabricColor/importEditFabricColor`, data, extraParams)
export const exportSupplierGreyFabric = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/exportExcel`, data)
export const reportColorFabricOrderQty = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/reportColorFabricOrderQty`, data)
export const misreportingColorFabricOrderQty = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/misreportingColorFabricOrderQty`, data)
export const misDeliveryToPurchaseSupplier = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/misDeliveryToPurchaseSupplier`, data)
export const reportFinishedQuantity = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/reportFinishedQuantity`, data)
export const transferFabricStock = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/transferFabricStock`, data)
export const editSupplierGreyFabric = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/editSupplierGreyFabric`, data)
export const createSupplierGreyFabric = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/create`, data)
export const misreportingFinishedQuantity = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/misreportingFinishedQuantity`, data)
export const sendToPurchaseSupplier = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/sendToPurchaseSupplier`, data)
// export const updateReplyDate = <T>(data?: any): Promise<IResponsePost<T>> =>
//   postRequestJson(`/api/sop/sop/purchaseFabricOrder/updateReplyDate`, data)
export const batchUpdateReplyDate = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/batchUpdateReplyDate`, data)
export const updatePurchaseFabricOrder = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/updatePurchaseFabricOrder`, data)
export const getTransferFabricStock = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/supplierGreyFabric/getTransferFabricStock`, data)
export const productFabricConfigCreate = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/productFabricConfig/create`, data)
export const exportFabricOrder = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/exportFabricOrder`, data)
export const getUnReplyDateCount = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/purchaseFabricOrder/getUnReplyDateCount`, data)
export const getPurchaseSupplierFabricStock = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/purchaseFabricOrder/getPurchaseSupplierFabricStock`, data)
export const getSupplierColorFabricStock = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/supplierColorFabricStock/pageList`, data)
export const getSupplierColorFabricStockPageStockFlow = <T>(data?: any): Promise<IResponseList<T>> =>
  postRequestList(`/api/sop/sop/supplierColorFabricStock/pageStockFlow`, data)

export const exportWithSpu = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/productSpuFabricColor/exportWithSpu`, data)
export const exportWithDev = <T>(data?: any): Promise<IResponsePost<T>> =>
  postRequestJson(`/api/sop/sop/productSpuFabricColor/exportWithDev`, data)
